/**
 * 
 */
package com.jilefojing.qiniu.beans.enums;

/**
 * @author 作者 jgshun
 * @version 创建时间：2016-7-15 下午4:03:01 类说明
 */
public enum BucketEnum {

	/**
	 * "jilefojing-img", "图片存储"
	 */
	IMG("jilefojing-img", "图片存储"),
	/**
	 * "jilefojing-audio", "音频存储"
	 */
	AUDIO("jilefojing-audio", "音频存储"),
	/**
	 * "jilefojing-video", "视频存储"
	 */
	VIDEO("jilefojing-video", "视频存储");

	/**
	 * 存储类型细分
	 * 
	 * @author jgshun
	 * 
	 */
	public enum BucketEnumExtral_SourceEnum {
		/**
		 * "video/cover", "视频封面"
		 */
		VIDEO_COVER("video/cover", "视频封面"),
		/**
		 * "audio/cover", "音频封面"
		 */
		AUDIO_COVER("audio/cover", "音频封面"),
		/**
		 * "user/portrait", "用户头像"
		 */
		USER_PORTRAIT("user/portrait", "用户头像"),
		/**
		 * "banner", "广告图"
		 */
		BANNER("banner", "广告图");

		private String value;
		private String msg;

		private BucketEnumExtral_SourceEnum(String value, String msg) {
			this.value = value;
			this.msg = msg;
		}

		public String getValue() {
			return value;
		}

		public void setValue(String value) {
			this.value = value;
		}

		public String getMsg() {
			return msg;
		}

		public void setMsg(String msg) {
			this.msg = msg;
		}

		public static BucketEnumExtral_SourceEnum getBucketExtral_SourceByValue(
				String value) {
			for (BucketEnumExtral_SourceEnum _Enum : BucketEnumExtral_SourceEnum
					.values()) {
				if (_Enum.getValue().equals(value)) {
					return _Enum;
				}
			}
			return null;
		}

	}

	private String value;
	private String msg;

	private BucketEnum(String value, String msg) {
		this.value = value;
		this.msg = msg;
	}

	public String getValue() {
		return value;
	}

	public String getMsg() {
		return msg;
	}

	public static BucketEnum getBucketByValue(String value) {
		for (BucketEnum _Enum : BucketEnum.values()) {
			if (_Enum.getValue().equals(value)) {
				return _Enum;
			}
		}
		return null;
	}

}
